package org.sky.util;

import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author weifx
 * @Title: Test
 * @ProjectName springboot-platform
 * @Description: TODO
 * @date 2019/3/24 20:47
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        List<Long> testList = new ArrayList<Long>();
        Long temp = null;
        for(int i=0;i<=10;i++){
            Long id = SnowflakeIdWorker.getInstance().nextId();
            testList.add(id);
            temp=id;
        }
        //System.out.println(testList.contains(temp));
        long begin = System.currentTimeMillis();
        for(int i=0;i<=100;i++) {

            String[] a = new String[]{"A", "B", "C", "D"};
            String[] b = new String[]{"D", "B", "C", "A"};
            Arrays.sort(a);
            Arrays.sort(b);
            System.out.println(JsonUtils.obj2json(a).equals(JsonUtils.obj2json(b)));

        }
        long end = System.currentTimeMillis();
        System.out.println(end-begin);

        TestA a = new TestA();
        try{
            a.devid(1,0);
        }catch (Exception e){
            System.out.println("=====");
            e.printStackTrace();
        }
    }
}
